import random

import pygame

from actor.walk_soldier import WalkSoldier


class ChineseWalkSoldier(WalkSoldier):
    def __init__(self, x, y):
        soldier_id = random.randint(1, 4)
        walk_image_path = "./resources/image/chinese/red_army/red_army{0}.png".format(soldier_id)
        super(ChineseWalkSoldier, self).__init__(walk_image_path, x, y, "红军" + str(soldier_id), 100)

    #     self.key = pygame.K_DOWN
    #     self.count = 10
    #
    # def run(self):
    #     if self.count == 0:
    #         key = random.randint(0, 4)
    #         self.count = 5
    #
    #         if key == 0:
    #             self.key = pygame.K_DOWN
    #         elif key == 1:
    #             self.key = pygame.K_UP
    #         elif key == 2:
    #             self.key = pygame.K_LEFT
    #         elif key == 3:
    #             self.key = pygame.K_RIGHT
    #     else:
    #         self.count -= 1
    #
    #     super(ChineseWalkSoldier, self).run(self.key)
